﻿using System.Web.UI;
using Summer.Log;
using System.Web;

#region License
/*
 *  Copyright (c) Dumuzi.cn 2009 , All rights reserved.
 *  CLR Version: 2.0.50727.4927
 *  NameSpace: Summer.Web.Support
 *  Author:Edwin Tai,戴佳顺
 *  Msn:edwin19861218@hotmail.com
 *  QQ: 1961218
 *  Date:2009-11-19 12:37:01
 *  Licensed under the Microsoft Public License (Ms-PL)
 *  This license governs use of the accompanying software. 
 *  If you use the software, you accept this license.
 *  If you do not accept the license, do not use the software.
 */
#endregion

namespace Summer.Web.Support
{
   internal class SummerPageHandlerFactory : PageHandlerFactory
    {
       private static ILog logger = LogFactory.GetLogger(typeof(SummerPageHandlerFactory), false);
       public override System.Web.IHttpHandler GetHandler(System.Web.HttpContext context, string requestType, string virtualPath, string path)
       {
           logger.Debug("The virtualPath is {0}", virtualPath);
           try
           {
               return base.GetHandler(context, requestType, virtualPath, path);
           }
           catch (HttpException e)
           {
               logger.Warn(e.Message);
           }
           return null;
       }
        public override void ReleaseHandler(System.Web.IHttpHandler handler)
        {
            base.ReleaseHandler(handler);
        }
       
    }
}
